using System;
class Quads {


    public Side s1 = new Side();
    public Side s2 = new Side();
    public Side s3 = new Side();
    public Side s4 = new Side();
    public Quads(){}

    public Quads(Side s1,Side s2,Side s3,Side s4) => (this.s1,this.s2,this.s3,this.s4) = (s1,s2,s3,s4); 

    public bool isLegel() {
        if(s1.getK() != s2.getK() && s2.getK() != s3.getK() && s3.getK() != s4.getK() && s4.getK() != s1.getK()) {
            return true;
        }else
        {
            return false;
        }
    }

    public double getArea() {
        double side = System.Math.Sqrt((s1.p2.y - s3.p2.y)*(s1.p2.y - s3.p2.y) + (s1.p2.x - s3.p2.x)*(s1.p2.x - s3.p2.x));
        double p1 = (s1.getLen() + s4.getLen() +  side)/2; 
        double area1 = System.Math.Sqrt(p1*(p1-s1.getLen())*(p1-s4.getLen())*(p1-side));
        double p2 = (s2.getLen() + s3.getLen() +  side)/2; 

        double area2 = System.Math.Sqrt(p1*(p1 - s2.getLen() )*(p1- s3.getLen() )*(p1-side));
        double area = area1 + area2;
        return area;

    }
    
}